package LxTest;

import java.util.Scanner;

public class Sumsub {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数");
        int sum1 = scanner.nextInt();
        System.out.println("请输入第二个数");
        int sum2 = scanner.nextInt();

        int sum = sum1 + sum2;
        int sub = sum1 - sum2;

        System.out.println("两数和为 " + sum);
        System.out.println("两数差为 " +  sub);

    }
}
